package com.whitenoise.model;

public class CalendarHelper {
	int months[]={31,28,31,30,31,30,31,31,30,31,30,31};
	int start[]={22,1,1,1,1,1,1,1,1,1,1,1};
	
	public CustomCalendar getMyCal(int val)
	{
		int date=0,month=0;
		
			for(int j=0,i=0; j<12 && i<val; j++)
			{
				month=j+1;
				for(int k=start[j];i<val && k<months[j]; k++,i++ )
				{
					date=k;
				}
			}
				CustomCalendar ob= new CustomCalendar(date,month);
		
		
		return ob;
	}
}

